package com.smz.service.impl;

import com.smz.dao.TDepartmentDAO;
import com.smz.entity.TDepartment;
import com.smz.service.TDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TDepartmentServiceImpl implements TDepartmentService {
    @Autowired
    private TDepartmentDAO tDepartmentDAO;
    @Override
    public TDepartment findDepartmentById(Integer id) {
        return tDepartmentDAO.selectDepartmentById(id);
    }


    @Override
    public List<TDepartment> findAllDepartment() {
        return tDepartmentDAO.selectAllDepartment();
    }
}
